﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class goodthing : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    private void OnCollisionEnter2D(Collision2D other) {
        if(other.transform.tag == "Player")
        {
            if(gameObject.transform.tag == "spire")
            {
                // 数量加一
                Destroy(gameObject);
            }
            else
            {
                // 数量加一，并且胜利
                Destroy(gameObject);
            }
        }
    }
}
